package com.googlecode.FWT.controller
{
	import com.googlecode.FWT.data.ProjectDataVO;
	import com.googlecode.FWT.model.ProjectDataProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	/**
	 *  
	 * @author ~martin
	 * 
	 */
	public class NumPagesCommand extends SimpleCommand
	{
		override public function execute(notification:INotification):void
		{
			// get the total number of pages
			var numPages:int = notification.getBody() as int;
			
			// get reference to ProjectDataProxy
			var proxy:ProjectDataProxy = facade.retrieveProxy(ProjectDataProxy.NAME) as ProjectDataProxy;
			
			// update 
			proxy.numPages = numPages;
		}
		
	}
}